package com.ddwl.funds.dao;

import com.ddwl.common.dao.TkDao;
import com.ddwl.funds.dao.mapper.AliPayConfigMapper;
import com.ddwl.funds.dao.model.AliPayConfig;
import org.springframework.stereotype.Repository;

/**
 * (AliPayConfig)数据处理
 *
 * @author zach
 * @since 2020-09-29 18:11:30
 */
@Repository
public class AliPayConfigDao extends TkDao<AliPayConfigMapper, AliPayConfig> {


    /**
     * 获取产品的配置信息
     * @return
     */
    public AliPayConfig getAliPayConfigByProduct(String product){
        AliPayConfig query = new AliPayConfig();
        query.setProduct(product);
        return selectOne(query);
    }

    /**
     * 根据支付宝appid查询支付宝配置信息
     * @param appId
     * @return
     */
    public AliPayConfig getAliPayConfigByAppId(String appId){
        AliPayConfig query = new AliPayConfig();
        query.setAppId(appId);
        return selectOne(query);
    }

}